export const formatLoveNum = loveNum => {
  let i = 0
  let float = 0
  for (i = 0; Math.floor(loveNum / 10000) !== 0; i++) {
    float = Math.floor(loveNum / 1000)
    loveNum = Math.floor(loveNum / 10000)
  }
  let numStr = ''
  switch (i) {
    case 1:
      numStr = '万'
      break
    case 2:
      numStr = '亿'
      break
  }
  float += ''
  let res = loveNum + (i === 0 ? '' : ('.' + float.substr(float.length - 1, 1))) + numStr
  if (loveNum === 0)
    res = '点赞'
  return res
}